<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Dashboard Template for Bootstrap</title>
    <!-- Bootstrap core CSS -->
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link th:href="@{/css/dashboard.css}" rel="stylesheet">
</head>

<body>
<div th:replace="~{commons/stu_commons::topbar}"></div>

<div class="container-fluid">
    <div class="row">
        <div th:replace="~{commons/stu_commons::sidebar(active='repair.html')}"></div>

        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
            <form action="/repair/save"  method="post" th:object="${repair}">
                <div class="form-group">
                    <label>位置：</label>
                    <input type="text" class="form-control" name="position"  th:value="${currentStu.getDormitory().getDormitoryNo()}">
                </div>
                <div class="form-group">
                    <label>姓名：</label>
                    <input type="text" class="form-control" name="userName"  th:value="${currentStu.getName()}" >
                </div>
                <div class="form-group">
                    <label>手机号：</label>
                    <input type="text" class="form-control" name="phone"  th:value="${currentStu.getPhone()}">
                </div>
                <div class="form-group">
                    <label>维修类型：</label>
                    <select class="form-control" name="type"  >
                        <option>水电类</option>
                        <option>基建类</option>
                        <option>网络类</option>
                        <option>消防设施类</option>
                    </select>
                </div>
                <div class="form-group">
                    <label>具体描述：</label><br/>
                    <textarea cols="50" rows="3" name="describe"></textarea>
                </div>
                <div class="form-group">
                    <label>图片：</label><br/>
                   <input type="file" name="imgFile" accept="image/*">
                </div>
                <button class="btn btn-primary" type="submit">添加</button>
            </form>
            <br/>
            <br/>
            <div class="table-responsive">
                <table class="table table-striped table-sm">
                    <thead>
                    <tr>
                        <th>位置</th>
                        <th>姓名</th>
                        <th>电话</th>
                        <th>类型</th>
                        <th>描述</th>
                        <th>状态</th>
                        <tH>图片</tH>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="repair : ${rep}">
                        <td th:text="${repair.getPosition()}"></td>
                        <td th:text="${repair.getUserName()}"></td>
                        <td th:text="${repair.getPhone()}"></td>
                        <td th:text="${repair.getType()}"></td>
                        <td th:text="${repair.getDescribe()}"></td>
                        <td th:text="${repair.getState()}"></td>
                        <td th:text="${repair.getImgFile()}"></td>
                        <td>
                            <a class="btn btn-sm btn-danger" th:href="@{/delrep/}+${repair.getRid()}">撤销</a>

                        </td>
                    </tr>

                    </tbody>
                </table>
            </div>
        </main>
    </div>
</div>



</body>

</html>